#!/bin/sh
#
# spousteni scriptu automatu
export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin
unalias ls
unalias cp
unalias rm
/usr/bin/touch /tmp/automatNabiha
cd /automat
/usr/bin/killall python
/bin/sleep 3
/usr/bin/killall owfs
/bin/sleep 1
/usr/bin/killall python
/usr/bin/killall owfs
# Spusteni one shot scriptu - pokud je
if [ -s /automat/oneshot.sh ]; then
    sh oneshot.sh
    rm -f oneshot.sh
fi
/usr/bin/find . -name \*.pyc -exec rm -f {} \;
/opt/owfs/bin/owfs --passive /dev/ttyS0 -m /usr/local/1wire
/bin/sleep 2
/usr/bin/open -c 8 -f python /automat/croco_main.py
/bin/sleep 3
/usr/bin/open -c 9 -f python /automat/nacitaniDatAutomatu.py
/bin/sleep 5
/usr/bin/open -c 10 -f python /automat/gsm_robot.py
/bin/rm -f /tmp/automatNabiha
